import request from '@/utils/request'

export function apiGetList(params, loading) {
  return request({
    url: `/obj/enumTypeController/list`,
    method: 'get',
    params,
    loading,
    autoUntie: false,
  })
}

export function apiAdd(data) {
  return request({
    url: '/obj/enumTypeController/add',
    method: 'post',
    data: data,
  })
}
export function apiEdit(data) {
  return request({
    url: '/obj/enumTypeController/edit',
    method: 'put',
    data: data,
  })
}

export function apiDel(ids) {
  return request({
    url: '/obj/enumTypeController/' + ids,
    method: 'delete',
  })
}

// 启用
export function apiEnable(data) {
  return request({
    url: '/obj/enumTypeController/enableData',
    method: 'post',
    data: data,
  })
}
// 停用
export function apiDisable(data) {
  return request({
    url: '/obj/enumTypeController/disableData',
    method: 'post',
    data: data,
  })
}

// 获取详情数据
export function apiGetInfoById(id) {
  return request({
    url: '/obj/enumTypeController/getAllInfoById?id=' + id,
    method: 'get',
  })
}

// 枚举类型弹窗
export function apiGetEnumTypeDialogList(params, loading) {
  return request({
    url: `/obj/enumTypeController/referGrid`,
    method: 'get',
    params,
    loading,
    autoUntie: false,
  })
}
